component: scf
name: http

inputs:
  src:
    src: ./
    exclude:
      - .env
  # 指定 SCF 类型为 Web 类型
  type: web
  name: web-function
  region: ap-guangzhou
  handler: scf_bootstrap
  runtime: Nodejs12.16
  memorySize: 512 # 内存大小，单位MB
  installDependency: true
  events:
    - apigw:
        parameters:
          protocols:
            - http
            - https
          environment: release
          endpoints:
            - path: /
              method: ANY
              function:
                # 指定 API 类型为 Web 类型
                type: web
